From: Ian Jackson Date: Wed, 19 Feb 2014 14:03:29 +0000 (+0000) Subject: libxl: Fix error path in libxl_device_events_handler X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~5468 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=c566ab68af7da089ae2b0ff664d02a93a0647584;p=xen.git libxl: Fix error path in libxl_device_events_handler libxl_device_events_handler would fail to call AO_ABORT if it failed; instead it would simply return rc. (This leaves the egc etc. from the now-abolished stack frame potentially live, and leaves the ctx locked.) In xl, this is of no consequence, because xl will immediately exit in this situation. This is very likely to be true in any other callers (of which we don't know of any, anyway). Coverity-ID: 1181840 Signed-off-by: Ian Jackson Acked-by: Ian Campbell CC: coverity@xenproject.org --- diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index 730f6e13b3..2d29ad2ce0 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -3881,7 +3881,8 @@ int libxl_device_events_handler(libxl_ctx *ctx, out: GC_FREE; - return rc ? : AO_INPROGRESS; + if (rc) return AO_ABORT(rc); + return AO_INPROGRESS; } /******************************************************************************/